//
//  LivePlayViewCell.swift
//  Swift_MyLive
//
//  Created by admin on 2017/5/12.
//  Copyright © 2017年 admin. All rights reserved.
//

import UIKit

class LivePlayViewCell: UITableViewCell {

    var imgV : UIImageView!
    var name : UILabel!
    var title : UILabel!
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
       super.init(style: style, reuseIdentifier: reuseIdentifier)
       
        imgV = UIImageView.init(frame: CGRect(x: 10, y: 10, width: 100, height: 80))
        self.contentView.addSubview(imgV)
        
        name = UILabel.init(frame: CGRect(x: 110, y: 10, width: WIDTH-120, height: 40))
        name.numberOfLines = 0
        self.contentView.addSubview(name)
        
        title = UILabel.init(frame: CGRect(x: 110, y: 40, width: WIDTH-120, height: 40))
        title.numberOfLines = 0
        self.contentView.addSubview(title)
    }
    
    func setCellInfo(dic: NSDictionary) {
        
        imgV.loadImgUrl(imgUrl: dic.stringForKey(key: "smallpic"))
        
        name.text = dic.stringForKey(key: "myname")
        title.text = dic.stringForKey(key: "signatures")
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
